shell脚本自动打卡打开微信

您所在的位置:网站首页 adb shell脚本 shell脚本自动打卡打开微信

shell脚本自动打卡打开微信

2023-09-13 16:28| 来源: 网络整理| 查看: 265

com.isoftstone.client.ipsa

com.isoftstone.client.ipsa

am start -n com.isoftstone.client.ipsa/com.isoftstone.ipsa.app.activity.SplashActivity

使屏幕点亮

input keyevent 224

滑动屏幕开锁 swipe     [duration(ms)] (Default: touchscreen)  

input swipe 300 1800 300 800

打开软件

am start -n com.isoftstone.client.ipsa/com.isoftstone.ipsa.app.activity.SplashActivity

延时几秒

点击某一位置

input tap 240 1500

等待几秒

input tap 900 1470

点击打卡

应该一直循环判断时间

打卡

写入apk在某个范围是打卡或者开启应用闹铃提醒打卡

input keyevent 224 input swipe 300 1800 300 800 am start -n com.isoftstone.client.ipsa/com.isoftstone.ipsa.app.activity.SplashActivity sleep 10 input tap 240 1500 sleep 11 input tap 900 1470

打开微信 //1、回到主界面 input keyevent 3 //2、打开微信 am start -n com.tencent.mm/com.tencent.mm.ui.LauncherUI //3、延时反应一会 sleep 3 //4、点击进入联系人 input tap 500 450 //5、进入输入菜单 input tap 1000 1850 //6、点视频聊天框 input tap 750 1350 //7、点击语音或视频聊天等待对方回复 input tap 600 1700

手机内执行脚本不能分隔开?

#!/system/bin/sh result=`sleep 3` result=`input keyevent 3` result=`am start -n com.tencent.mm/com.tencent.mm.ui.LauncherUI` result=`sleep 5` result=`input tap 500 450 ` result=`input tap 1000 1850` result=`input tap 750 1350` result=`input tap 600 1700`

>adb rootadbd cannot run as root in production buildsexit的话,先是退回到$,之后才是退出shell。执行

$adb shell

#su

获取文件系统的读写权限,只需要执行shell脚本中一句 mount -o rw,remount / 调起 Activity

命令格式:

adb shell am start [options]

例如:

adb shell am start -n com.tencent.mm/.ui.LauncherUI

表示调起微信主界面。

adb shell am start -n org.mazhuang.boottimemeasure/.MainActivity --es "toast" "hello, world"

表示调起 org.mazhuang.boottimemeasure/.MainActivity 并传给它 string 数据键值对 toast - hello, world。

点亮屏幕:

adb shell input keyevent 224

熄灭屏幕:

adb shell input keyevent 223 滑动解锁

如果锁屏没有密码,是通过滑动手势解锁,那么可以通过 input swipe 来解锁。

命令(参数以机型 Nexus 5,向上滑动手势解锁举例):

adb shell input swipe 300 1000 300 500

参数 300 1000 300 500 分别表示起始点x坐标 起始点y坐标 结束点x坐标 结束点y坐标。

输入文本

在焦点处于某文本框时,可以通过 input 命令来输入文本。

命令:

adb shell input text hello

现在 hello 出现在文本框了。

2.模拟物理按键操作: input keyevent 3 3.模拟点击操作:input tap 500 500

4.模拟滑动操作:input swipe 200 500  400 500

查看Android应用包名、Activity的几个方法

adb shell pm list packages  如果想知道应用对应的apk文件在手机上的安装位置则可以在上面的命令后加-f参数 adb shell pm list packages -f 二、只有Apk的情况 (1)aapt 使用命令行aapt dump xmltree ColaBox.apk AndroidManifest.xml

(2)使用apktool

使用反编译工具apktool,反编译后打开AndroidManifest.xml文件,查找方式同“有源码情况”

(3)aapt

感谢“天地会珠海分舵”地址:http://blog.csdn.net/zhubaitian/article/details/38926679

三、没有apk,应用已经安装到手机或虚拟机中

1.logcat

.清除logcat内容,使用命令adb logcat -c

.启动logcat,使用命令adb logcat ActivityManager:I *:s

.启动要查看的程序,

2.dumpsys

(1)启动要查看的程序;

(2)命令行输入:adb shell dumpsys window w |findstr \/ |findstr name=



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3